/*
 * at25.h
 * Contains definitions for commands for the Atmel AT-25 SPI Flash devices
 *  Created on: May 27, 2010
 *      Author: Tyler Lalime
 */

#ifndef AT25_H_
#define AT25_H_


//Read commands
#define read_array 0x0B
#define read_arraylf 0x03

//Program and erase commands
#define block_erase_4k 0x20
#define block_erase_32k 0x52
#define block_erase_64k 0xD8
#define chip_erase 0x60
#define byte_prog 0x02
#define seq_prog 0xAD

//Protection commands
#define write_enable 0x06
#define write_disable 0x04
#define protect_sect 0x36
#define unprotect_sect 0x39
#define read_protect_reg 0x3C

//Status register commands
#define read_status_reg 0x05
#define write_status_reg 0x01

//Misc commands
#define read_id 0x9F
#define power_down 0xB9
#define power_resume 0xAB



#endif /* AT25_H_ */
